package day1;

public class TestWhile {
    public static void main(String[] args) {
        //控住太输出0-4
        int i = 0;
        while (i <= 4) {
            System.out.println(i);
            i++;
        }

        //0-100奇数之和
        int j = 1;
        int sum = 0;
        while (j <= 100) {
            if (j % 2 != 0) {
                sum += j;
            }
            j++;
        }
        System.out.println("奇数之和为：" + sum);


    }


}
